import request from '@/utils/request'
//使用说明
//  export const getList = data => request.get('/api/list', data, false)
//              页面调用名  请求参数       请求类型  接口地址         loading是否显示
/*页面中调用方法：（若无请求参数则留空,例：this.$api.getList()）
this.$newapi.getList(params).then(res => {})
*/

//登陆
export const login = data => request.post('/api/user/login', data)
//获取用户信息
export const getUserInfo = data => request.get('/api/user/userInfo', data)
//后台保存订单
export const insertOrder = data => request.post('/api/order/insertOrder', data)
//订单数据修改
export const updateOrder = data => request.post('/api/order/updateOrder', data)
//修改订单状态
export const updateOrders = data => request.put('/api/orders/updateOrder', data)
//保存沟通详情
export const repairDealInsert = data => request.post('/api/repairDeal/insert', data)
//保存维修结果
export const repairDealUpdate = data => request.post('/api/repairDeal/update', data)
//获取沟通详情
export const getRepairDeal = data => request.get('/api/repairDeal/getRepairDeal', data)
//后台保存配件列表
export const partInsert = data => request.post('/api/part/insert', data)
//更改配件实际使用数量
export const partUpdate = data => request.post('/api/part/update', data)
//获取订单
export const getOrderList = data => request.get('/api/order/getAll', data)
//查看订单下配件
export const getPartList = data => request.get('/api/part/getAll', data)
//获取用户列表
export const getUserList = data => request.get('/api/user/userList', data)


//图片上传
export const picture = data => request.get('/upload/picture', data)
//视频上传
export const video = data => request.get('/upload/video', data)